package android.slc.user.ui;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.slc.appbase.ui.activity.base.AppMvvmBaseToolBarActivity;
import android.slc.user.R;
import android.slc.user.databinding.UserActivityLoginBinding;

import androidx.annotation.Nullable;

/**
 * @author slc
 * @date 2020-06-19 9:59
 */
public class LoginActivity extends AppMvvmBaseToolBarActivity<UserActivityLoginBinding,LoginVm> {

    public static void show(Context context) {
        context.startActivity(new Intent(context, LoginActivity.class));
    }

    @Override
    public Object setContentView() {
        return R.layout.user_activity_login;
    }

    @Override
    public void onBindView(@Nullable Bundle savedInstanceState) {
        super.onBindView(savedInstanceState);
        mSlcToolbar.setNavigationIcon(null);
        mSlcToolbar.setTitle(R.string.user_label_login);
    }

    @Override
    public void onBindViewLater() {
        super.onBindViewLater();
        getDataBinding().setVm(viewModel);
        viewModel.init(getIntent().getExtras());
    }
}
